﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Enterprise/Master/AdminMaster.Master" AutoEventWireup="true" CodeBehind="CompanyMaintain.aspx.cs" Inherits="HZ.DrugTrade.Web.Enterprise.RelationQuery.CompanyMaintain" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
    <asp:Label ID="lblNav" runat="server"></asp:Label>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                企业名称：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtReturnlName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                企业类型：
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="DllType" runat="server">
                                    <asp:ListItem Text="(全部)" Value=""></asp:ListItem>
                                    <%--<asp:ListItem Text="生产企业" Value="0"></asp:ListItem>--%>
                                    <asp:ListItem Text="经营企业" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="配送企业" Value="2"></asp:ListItem>
                                    <asp:ListItem Value="3" Text="生产企业直接配送"></asp:ListItem>
                                    <asp:ListItem Value="4">经营企业直接配送</asp:ListItem>
                                    <%--<asp:ListItem Value="5">现代医药物流企业</asp:ListItem>--%>
                                </asp:DropDownList>
                            </td>
                            
                            <td align="right">
                                配送地区：
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="DllArea" runat="server">
                                    <asp:ListItem Text="--不限--" Value="-1"></asp:ListItem>
                                    <asp:ListItem Text="(全区)" Value=""></asp:ListItem>
                                    <asp:ListItem Text="呼和浩特市" Value="150100"></asp:ListItem>
                                    <asp:ListItem Text="包头市" Value="150200"></asp:ListItem>
                                    <asp:ListItem Text="乌海市" Value="150300"></asp:ListItem>
                                    <asp:ListItem Text="赤峰市" Value="150400"></asp:ListItem>
                                    <asp:ListItem Text="通辽市" Value="150500"></asp:ListItem>
                                    <asp:ListItem Text="鄂尔多斯市" Value="150600"></asp:ListItem>
                                    <asp:ListItem Text="呼伦贝尔市" Value="150700"></asp:ListItem>
                                    <asp:ListItem Text="巴彦淖尔市" Value="150800"></asp:ListItem>
                                    <asp:ListItem Text="乌兰察布市" Value="150900"></asp:ListItem>
                                    <asp:ListItem Text="兴安盟" Value="152200"></asp:ListItem>
                                    <asp:ListItem Text="锡林郭勒盟" Value="152500"></asp:ListItem>
                                    <asp:ListItem Text="阿拉善盟" Value="152900"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                经营许可证号：
                            </td>
                            <td align="left" >
                                <asp:TextBox ID="txtBusinessCertificate" runat="server"></asp:TextBox>
                            </td>
                            <td align="right" >
                                &nbsp;项目：</td>
                            <td align="left">
                                <asp:DropDownList ID="ddlProject" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="100px">
                    <hz:HzButton ID="btnQuery" runat="server" Text="查询" CssClass="btn" OnClick="btnQuery_Click" />
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwCompnayist" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="CompanyID" OnRowCommand="gvwRoleList_RowCommand" OnRowEditing="gvwCompnayist_RowEditing"
        OnRowUpdating="gvwCompnayist_RowUpdating" OnRowCancelingEdit="gvwCompnayist_RowCancelingEdit"
        OnRowDataBound="gvwCompnayist_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex+1+AspNetPager1.PageSize*(AspNetPager1.CurrentPageIndex-1) %>
                </ItemTemplate>
                <HeaderStyle Width="40px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="企业名称">
                <ItemTemplate>
                    <%#GetCompanyRender(Convert.ToString( Eval("CompanyID")),Convert.ToString(Eval("CompanyName")),Convert.ToInt32(Eval("CompanyType"))) %>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtCompanyName" runat="server" Text='<%# DataBinder.Eval(Container,"DataItem.CompanyName") %>'
                        Width="200px"></asp:TextBox>
                </EditItemTemplate>
                <HeaderStyle Width="250px" />
            </asp:TemplateField>
            <asp:BoundField DataField="BusinessCertificate" HeaderText="经营许可证号" />
            <asp:TemplateField HeaderText="企业类型">
                <ItemTemplate>
                    <asp:Label ID="lblCompanyType" runat="server" Text='<%#Eval("CompanyType").ToString()=="1"?"经营企业":"配送企业"%>'></asp:Label>
                </ItemTemplate>
                <%--<EditItemTemplate>
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"
                           RepeatLayout="Flow">
                        <asp:ListItem Text="生产企业" Value="0"></asp:ListItem>
                        <asp:ListItem Text="经营企业" Value="1"></asp:ListItem>
                        <asp:ListItem Text="配送企业" Value="2"></asp:ListItem>
                    </asp:RadioButtonList>
                </EditItemTemplate>--%>
            </asp:TemplateField>
            <asp:BoundField DataField="CompanyName_Add" HeaderText="添加人" Visible="false" />
            <asp:TemplateField HeaderText="配送操作">
                <ItemTemplate>
                <hz:HzLinkButton ID="lbnADD" runat="server" CommandName="Dist" 
                        CommandArgument='<%#Eval("CompanyID") + "|" + Eval("ishcygcg") %>' OperateType="新增"><img src="../../lib/images/setting.gif" align="middle" alt="" >配送区域</hz:HzLinkButton>
                </ItemTemplate>
                <HeaderStyle Width="80px" />
            </asp:TemplateField>
            <%--<asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnEdit" runat="server" CommandName="Edit"  Enabled='<%#Eval("Addpersonid").ToString().Length>0?true:false %>'    Text="修改"  OperateType="编辑"></hz:HzLinkButton>
                    <hz:HzLinkButton ID="lbtnDel" runat="server" CommandName="Del" OnClientClick="if(!this.disabled){return  confirm('确认要删除此行信息吗？');}else{return false;}"
                        CommandArgument='<%#Eval("CompanyID") %>' Visible="false">删除</hz:HzLinkButton>
                </ItemTemplate>
                <EditItemTemplate>
                    <hz:HzLinkButton ID="lbnUpdate" runat="server" CausesValidation="True" CommandName="Update"
                        Text="更新" />
                    <hz:HzLinkButton ID="lbnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="取消" />
                </EditItemTemplate>
            </asp:TemplateField>--%>
            <asp:BoundField DataField="CompanyID" HeaderText="编号" HeaderStyle-CssClass="hide"
                ItemStyle-CssClass="hide" />
            <asp:BoundField DataField="CompanyType" HeaderText="企业类型" HeaderStyle-CssClass="hide"
                ItemStyle-CssClass="hide" />
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>说明：<span>此处仅能查询配送企业和经营企业； </span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="增加企业" Visible="false" OnClick="btnAdd_Click1" CssClass="btn" OperateType="新增" />
    </div>
</asp:Content>
